package cn.zhf.shop.mapper;

import cn.zhf.shop.entity.ConsoleUser;
import cn.zhf.shop.entity.search.ConsoleUserSearch;import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface ConsoleUserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(ConsoleUser record);

    int insertSelective(ConsoleUser record);

    ConsoleUser selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(ConsoleUser record);

    int updateByPrimaryKey(ConsoleUser record);

    ConsoleUser doLogin(@Param("username") String username, @Param("password") String password);

    List<ConsoleUser> selectAll();

    int updatePasswordByUserId(@Param("updatedPassword") String updatedPassword, @Param("userId") Integer userId);

    List<ConsoleUser> selectByUserIdAndOrgIdAndUserGroupAndUsername(String str);

    List<ConsoleUser> selectByUserIdAndOrgIdAndUserGroupAndUsername2(@Param("userId") Integer userId, @Param("orgId") Integer orgId, @Param("userGroup") Integer userGroup, @Param("username") String username);

    List<ConsoleUser> selectByUserGroup(@Param("userGroup") Integer userGroup);

    List<ConsoleUser> selectByUserGroupAndAgentLeader(@Param("userGroup")Integer userGroup,@Param("agentLeader")Integer agentLeader);



    List<ConsoleUser> selectByUserGroup1(@Param("userGroup") Integer userGroup);

    ConsoleUser selectByUsername(@Param("username") String username);

    List<ConsoleUser> selectByOrgIdAndUserGroupAndUsername(ConsoleUserSearch consoleUserSearch);

    int updateLevelByUserId(@Param("updatedLevel") Integer updatedLevel, @Param("userId") Integer userId);

    ConsoleUser selectByUserPhoneAndPassword(@Param("userPhone") String userPhone, @Param("password") String password);

    int updateSubordinateIdByUserId(@Param("updatedSubordinateId") String updatedSubordinateId, @Param("userId") Integer userId);

    int updateSubordinateIdAndAgentLeaderByUserId(@Param("updatedSubordinateId")String updatedSubordinateId,@Param("updatedAgentLeader")Integer updatedAgentLeader,@Param("userId")Integer userId);


    ConsoleUser selectByAll(ConsoleUser consoleUser);

    List<ConsoleUser> selectByRealnameMohuSearch(@Param("str") String str);
}